#!/bin/sh
echo 'import data ...'
currDate=`date +%Y%m%d`
echo "当前时间为：$currDate"
echo "hdfs文件目录为：/user_clicks/$currDate/"
##导入当天生成的日志文件进入用户行为表
##/opt/lagou/servers/hive-2.3.7/bin/hive -e "USE default;LOAD DATA INPATH '/user_clicks/$currDate/*' OVERWRITE INTO TABLE user_clicks PARTITION (dt='$currDate');"
/opt/lagou/servers/hive-2.3.7/bin/hive -e "USE default;LOAD DATA INPATH '/user_clicks/20210414/*' OVERWRITE INTO TABLE user_clicks PARTITION (dt='20210414');"
